<UserControl x:Class="CodeIn.Modules.Misc.WelcomeScreen.WelcomeView"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:local="clr-namespace:CodeIn.Modules.Misc.WelcomeScreen"
		xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
		xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d"
		d:DesignHeight="300" d:DesignWidth="300">

	<Grid>		
		<DockPanel Margin="5">
			<Image DockPanel.Dock="Top" Stretch="None" HorizontalAlignment="Left"
					Source="pack://application:,,,/resources/gfx/title.png" />
			<Grid DockPanel.Dock="Top">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="1*" />
					<ColumnDefinition Width="3*" />
				</Grid.ColumnDefinitions>
				<StackPanel Grid.Column="0">
					<TextBlock TextWrapping="Wrap" Text="Welcome to the CodeIn environment." />
				</StackPanel>
				<DockPanel Grid.Column="1">
					<TextBlock DockPanel.Dock="Top" TextTrimming="CharacterEllipsis"
							Text="Latest updates" FontSize="16" />
					<Rectangle DockPanel.Dock="Top" Fill="#888" Height="1" Margin="0,0,0,10" />
					<DockPanel DockPanel.Dock="Top">
						<TextBlock DockPanel.Dock="Left" Text="RSS feed: "
								VerticalAlignment="Center" />
						<Button DockPanel.Dock="Right" Padding="2,0" Margin="5,0,0,0"
								Command="{Binding ReloadRssFeedCommand}">
							<Image Source="pack://application:,,,/resources/gfx/icon_reload.png" Stretch="None" />
						</Button>
						<TextBox Text="{Binding RssFeedUrl, UpdateSourceTrigger=PropertyChanged}"
								VerticalAlignment="Center" />
					</DockPanel>
					<ListBox ItemsSource="{Binding ProjectUpdateItems}" Background="Transparent"
							BorderThickness="0" Margin="0,10,0,0"
							ScrollViewer.HorizontalScrollBarVisibility="Disabled"
							ScrollViewer.VerticalScrollBarVisibility="Visible">
						<ListBox.ItemTemplate>
							<DataTemplate DataType="{x:Type local:RssItem}">
								<Grid>
									<Grid.RowDefinitions>
										<RowDefinition />
										<RowDefinition />
									</Grid.RowDefinitions>
									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="auto" />
										<ColumnDefinition />
									</Grid.ColumnDefinitions>
									<TextBlock Grid.Row="0" Grid.Column="0">
								<Hyperlink NavigateUri="{Binding Link}"
												Click="OnSourceCodeLinkClick">
									<Run Text="{Binding Title}" />
								</Hyperlink>
									</TextBlock>
									<TextBlock Grid.Row="0" Grid.Column="1" Foreground="#888"
											Text="{Binding Date}" TextAlignment="Right"
											TextTrimming="CharacterEllipsis" />
									<TextBlock Grid.Row="1" Grid.ColumnSpan="2" Margin="0,3,0,0"
											TextWrapping="Wrap" Text="{Binding Description}" />
								</Grid>
							</DataTemplate>
						</ListBox.ItemTemplate>
						<ListBox.ItemContainerStyle>
							<Style TargetType="{x:Type ListBoxItem}">
								<Setter Property="OverridesDefaultStyle" Value="true" />
								<Setter Property="Margin" Value="0,0,5,10" />
								<Setter Property="Padding" Value="0,2" />
								<Setter Property="HorizontalContentAlignment" Value="Stretch" />
								<Setter Property="Template">
									<Setter.Value>
										<ControlTemplate TargetType="{x:Type ListBoxItem}">
											<ContentPresenter />
										</ControlTemplate>
									</Setter.Value>
								</Setter>
							</Style>
						</ListBox.ItemContainerStyle>
					</ListBox>
				</DockPanel>
			</Grid>
		</DockPanel>
	</Grid>

</UserControl>
